
namespace Profit.Views.Interfaces
{
    using System.Windows;
    using System.ComponentModel;
    using System.Windows.Threading;
    /// <summary>
    /// View interface contract
    /// </summary>
    public interface IView
    {
        /// <summary>
        /// Obtains or defines the view datacontext
        /// </summary>
        object DataContext { get; set; }
        /// <summary>
        /// Closes the view
        /// </summary>
        void Close();
        /// <summary>
        /// Show a dialog view
        /// </summary>
        /// <param name="parent"></param>
        /// <returns></returns>
        bool? ShowDialog(IView parent);
        /// <summary>
        /// Show the view
        /// </summary>
        void Show();
        /// <summary>
        /// Obtains or defines the view title
        /// </summary>
        string Title { get; set; }
        /// <summary>
        /// Obtains or defines the dialog result value
        /// </summary>
        bool? DialogResult { get; set; }
        /// <summary>
        /// Obtains or defines the view owner
        /// </summary>
        Window Owner { get; set; }
        /// <summary>
        /// Bings the view to the foreground
        /// </summary>
        bool Activate();
        /// <summary>
        /// Occurs when the view is about to close
        /// </summary>
        event CancelEventHandler Closing;
        /// <summary>
        /// View dispatcher
        /// </summary>
        Dispatcher Dispatcher { get; }
    }
}